package small.woods.msweb.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import small.woods.msweb.mapper.UserMapper;
import small.woods.msweb.model.po.UserPO;
import small.woods.msweb.service.UserService;

/**
 * @Author: small_woods
 * @Date: 2020/6/16 11:51
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, UserPO> implements UserService {

    /**
     * new LambdaQueryWrapper<>()  ==  new QueryWrapper<>().lambda()
     * @param username
     * @return
     */
    @Override
    public String selectByUserName(String username) {
        return this.baseMapper.selectOne(new LambdaQueryWrapper<UserPO>().eq(UserPO::getUserName, username)).getPassword();
    }

}
